<template>
  <view class="background-white">
    <view class="bor-btm">
      姓名：<text>{{ detail.visitorName || '--' }}</text>
    </view>
    <view class="bor-btm">
      性别：<text>{{ detail.sexLabel || '--' }}</text>
    </view>
    <view class="bor-btm">
      照片：
      <image-upload v-if="detail.photo" state="view" :imageUrl="detail.photo"></image-upload>
      <text v-else>--</text>
    </view>
    <view class="bor-btm">
      身份证：<text>{{ detail.idCard || '--' }}</text>
    </view>
    <view class="bor-btm">
      电话：<text>{{ detail.phone || '--' }}</text>
    </view>
    <view class="bor-btm">
      拜访时间：
      <text> {{ detail.visitStartTime || '' }}{{ detail.visitEndTime ? ` - ${detail.visitEndTime}` : '' }} </text>
    </view>
    <view class="bor-btm">
      拜访部门：<text>{{ detail.deptName || '--' }}</text>
    </view>
    <view class="bor-btm">
      创建时间：<text>{{ detail.createTime || '--' }}</text>
    </view>
    <view class="bor-btm">
      创建人：<text>{{ detail.creator || '--' }}</text>
    </view>
    <view class="bor-btm">
      事由：<text>{{ detail.reason || '--' }}</text>
    </view>
  </view>
</template>

<script>
import ImageUpload from '@/components/image-upload/index.vue'

export default {
  name: 'VisitDetailItem',

  components: { ImageUpload },

  props: {
    detail: {
      type: Object,
      default: () => ({})
    },
    hiddenResult: {
      type: Boolean,
      default: false
    }
  },

  data() {
    return {}
  },

  computed: {},

  watch: {},

  created() {},

  mounted() {},

  destroyed() {},

  methods: {}
}
</script>

<style scoped lang="scss">
.background-white {
  background-color: #fff;
  padding: 0rpx 0rpx 0rpx 30rpx;

  view {
    padding: 14rpx 0;

    text {
      color: #333;
    }
  }

  .bor-btm {
    border-bottom: 1px solid #d5d7e3;
    padding: 24rpx 0;
    padding-right: 24rpx;
    color: #999;
    image {
      width: 200rpx;
      height: 200rpx;
    }
  }
}
</style>
